From 902e5dabbb1ab0612764983c094af398e5f636ee Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Thu, 26 Jan 2023 17:02:02 +0700 Subject: Invoice and invoice detail --- src/pages/my/transactions/[id].js | 89 --------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 src/pages/my/transactions/[id].js (limited to 'src/pages/my/transactions/[id].js') diff --git a/src/pages/my/transactions/[id].js b/src/pages/my/transactions/[id].js deleted file mode 100644 index 110915cf..00000000 --- a/src/pages/my/transactions/[id].js +++ /dev/null @@ -1,89 +0,0 @@ -import AppBar from "@/components/layouts/AppBar"; -import Layout from "@/components/layouts/Layout"; -import LineDivider from "@/components/elements/LineDivider"; -import WithAuth from "@/components/auth/WithAuth"; -import { useEffect, useState } from "react"; -import apiOdoo from "@/core/utils/apiOdoo"; -import { useRouter } from "next/router"; -import { useAuth } from "@/core/utils/auth"; -import VariantCard from "@/components/variants/VariantCard"; -import currencyFormat from "@/core/utils/currencyFormat"; -import Disclosure from "@/components/elements/Disclosure"; -import DescriptionRow from "@/components/elements/DescriptionRow"; -import { TransactionDetailAddress } from "@/components/transactions/TransactionDetail"; -import { SkeletonList } from "@/components/elements/Skeleton"; - -export default function DetailTransactions() { - const router = useRouter(); - const { id } = router.query; - const [ auth ] = useAuth(); - const [ transaction, setTransaction ] = useState(null); - - useEffect(() => { - if (auth) { - const loadTransaction = async () => { - const dataTransaction = await apiOdoo('GET', `/api/v1/partner/${auth?.partner_id}/sale_order/${id}`); - setTransaction(dataTransaction); - } - loadTransaction(); - } - }, [ auth, id ]); - - return ( - - - - - { transaction ? ( - <> -
- - Pending Quotation - - - { transaction?.name } - - - { transaction?.po_name || '-' } - - - { transaction?.payment_term } - - - { transaction?.sales } - - - { transaction?.date_order } - -
- - - - - -
- { transaction?.products?.map((product, index) => ( - - )) } -
-

Total Belanja

-

{ currencyFormat(transaction?.amount_total || 0) }

-
-
- - - - ) : ( -
- -
- ) } -
-
- ); -} \ No newline at end of file -- cgit v1.2.3